NeXT TypedStream Data | 1993-11-09 | 5.8 KB | 89 lines
streamtyped
IBObjectData
Object
CustomObject
Application
ButtonCell
ActionCell
Helvetica
Matrix
Control
Responder
TextField
TextFieldCell
Steps:
Solutions:
Button
Pause at solution
NXImage
NXswitch
NXswitchH
@:@iiii
[64@]
NXCachedImageRep
NXImageRep
iisssss
iiiiii
ff@@#::s
WindowTemplate
iiii***@s@
Panel
Eight Queens Puzzle
by Peter Kron
ScrollView
ClipView
ciifffcfffs
[842c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
\margl40
\margr40
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 This app searches for solutions to the classic
\b Eight Queens Puzzle
\b0 , in which the challenge is to place eight queens on a chessboard such that none is attacking any other.\
As can be seen from the source, there is a simple recursive algorithm for placing a queen on a row given the columns containing queens in the rows above.\
You can sit back and watch as it scans the rows.\
\b Acknowledgements:\
\b0 I grabbed the queen icon from the Demo Chess program.\
My son, Michael, challenged me to write this program.\
\b Bugs:\
\b0 Printing always shows the queen on a white square, since the transparency of the icon is ignored.\